home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 7
/
Aminet 7 - August 1995.iso
/
Aminet
/
comm
/
net
/
netutils.lha
/
NetUtilities
/
source
/
inform.c
next >
Wrap
C/C++ Source or Header
|
1993-04-05
|
562b
|
32 lines
#include <stdio.h>
#include <libraries/dos.h>
#define INF_PKT "ram:inform.pkt"
#define CMD_PKT "ram:command.pkt"
void main(void) {
FILE *file=0;
char buf[256];
for(;;) {
chkabort();
Delay(75);
if (access(INF_PKT, 0) == 0) {
DisplayBeep(NULL);
remove(INF_PKT);
}
if (access(CMD_PKT, 4) == 0) {
if (file = fopen(CMD_PKT, "r")) {
fgets(buf, sizeof(buf), file);
Execute(buf,0,0);
fclose(file);
file=0;
remove(CMD_PKT);
} else puts("File execution error\n");
}
}
}